<template>
	<view class="" >
		<!-- 手续-->
		<u-popup v-model="status" mode="bottom" length="44%" border-radius="30">
			<view class="popupWrap">
				<view class="popuptitle">手续</view>
				<view class="popupList" v-for="(it, index) in Formalities" :key="index" @click="sxclick(it)">{{ it.label }}</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				//手续列表
				Formalities: [{
				  label: '随车',
				  value: 0
				}, {
				  label: '7天内发',
				  value: 1
				}, {
				  label: '15天内发',
				  value: 2
				}, {
				  label: '30天内发',
				  value: 3
				}]
			}
		},
		props:['status','id'],
		watch:{
			id(val){
				if(val !==undefined && val !==null && val !==''){
					this.Formalities.forEach(it=>{
						if(it.value==val){
							this.sxclick(it)
						}
					})
				}
			}
		},
		methods:{
			
			//手续
			sxclick(val) {
			  this.$emit('getFormalties',val)
			},
		}
	}
</script>

<style scoped lang="scss">
	.popupWrap{
		background: #FFFFFF;
		text-align: center;
		.popuptitle{
			height: 96rpx;
			border-bottom: 1px solid #EEEEEE;
			line-height: 96rpx;
		}
		.popupList{
			height: 120rpx;
			line-height: 120rpx;
			border-bottom:0px
		}
	}
</style>
